<?php echo form_open(BASE_URL . '/' . $this -> admin . '/create_event_form', array('id' => 'event_application_form', 'method' => 'post')); ?>
<!--form starts-->
<div class="form_container">
	<h4>Create Application Form</h4>
	<!--row starts-->
	<div class="success_msg" style="margin-left:15px;">
		<?php
		if (isset($error) && $error != '') {
			echo $error;
		} else if ($this -> session -> userdata('event_success')) {
			echo $this -> session -> userdata('event_success');
			$this -> session -> set_userdata('event_success', '');
		}
		?>
	</div>
	<div class="row1">
		<div class="form-group col-sm-12">
			<label for="eventname2">Choose Event <span class="asterisk">*</span></label>
			<select class="form-control white" id="choose_event" name="choose_event" required>
				<option value="">Choose Event</option>
				<?php if(isset($event_data) && !empty($event_data)){ 
					foreach($event_data as $temp){?>
				<option value="<?php echo $temp['event_id'];?>" <?php if(isset($post_value['choose_event']) && $post_value['choose_event'] == $temp['event_id']) echo 'selected'; ?>><?php echo $temp['event_name'];?></option>
				<?php }}?>
			</select>
			<div class="error" id="err-name"></div>
		</div>
		<div class="clearfix"></div>
	</div>
	<div class="row1">
		<div class="form-group col-sm-12">
			<label for="eventname2">Form Activation Status <span class="asterisk">*</span></label>
			<select class="form-control white" id="activation_status" name="activation_status" required>
				<option selected value="Form is Enabled" <?php if(isset($post_value['activation_status']) && $post_value['activation_status'] == 'Form is Enabled') echo 'selected'; ?>>Form is Enabled</option>
				<option value="Form is Disabled" <?php if(isset($post_value['activation_status']) && $post_value['activation_status'] == 'Form is Disabled') echo 'selected'; ?>>Form is Disabled</option>
			</select>
			<div class="error" id="err-name"></div>
		</div>
		<div class="clearfix"></div>
	</div>
	<!--row closed-->
	<!--row starts-->
	<div class="row1">
		<div class="form-group col-sm-12">
			<label for="Description2">Form Header <span class="asterisk">*</span></label>
			<textarea class="form-control white" id="form_header" name="form_header"><?php if(isset($post_value['from_header'])) echo $post_value['from_header']; ?></textarea>
			<script type="text/javascript" src="<?php echo ASSET_URL; ?>ckeditor/ckeditor.js?t=B5GJ5GG"></script>
			<script type="text/javascript">
				//<![CDATA[
				CKEDITOR.replace('form_header', {
					"toolbar" : "Basic"
				});
				//]]>
			</script>
			<div class="error" id="err-desc"></div>
		</div>
		<div class="clearfix"></div>
	</div>
	<!--row closed-->
	<!--row starts-->
	<div class="row1">
		<div class="form-group col-sm-12">
			<label for="Description2">Form Footer</label>
			<textarea class="form-control white" id="form_footer" name="form_footer"><?php if(isset($post_value['from_footer'])) echo $post_value['from_footer']; ?></textarea>
			<script type="text/javascript" src="<?php echo ASSET_URL; ?>ckeditor/ckeditor.js?t=B5GJ5GG"></script>
			<script type="text/javascript">
				//<![CDATA[
				CKEDITOR.replace('form_footer', {
					"toolbar" : "Basic"
				});
				//]]>
			</script>
			<div class="error" id="err-cat"></div>
		</div>
		<div class="clearfix"></div>
	</div>
	<!--row closed-->
	<!--row starts-->
	<div class="row1">
		<div class="form-group col-sm-12">
			<label for="Description2">Thankyou Page</label>
			<textarea class="form-control white" id="thanks_page" name="thanks_page"><?php if(isset($post_value['thanks_page'])) echo $post_value['thanks_page']; ?></textarea>
			<script type="text/javascript" src="<?php echo ASSET_URL; ?>ckeditor/ckeditor.js?t=B5GJ5GG"></script>
			<script type="text/javascript">
				//<![CDATA[
				CKEDITOR.replace('thanks_page', {
					"toolbar" : "Basic"
				});
				//]]>
			</script>
			<div class="error" id="err-cat"></div>
		</div>
		<div class="clearfix"></div>
	</div>
	<!--row closed-->
	<!--row starts-->
	<div class="row1">
		<div class="form-group col-sm-12">
			<label for="Description2">Declined Page</label>
			<textarea class="form-control white" id="decline_page" name="decline_page"><?php if(isset($post_value['decline_page'])) echo $post_value['decline_page']; ?></textarea>
			<script type="text/javascript" src="<?php echo ASSET_URL; ?>ckeditor/ckeditor.js?t=B5GJ5GG"></script>
			<script type="text/javascript">
				//<![CDATA[
				CKEDITOR.replace('decline_page', {
					"toolbar" : "Basic"
				});
				//]]>
			</script>
			<div class="error" id="err-cat"></div>
		</div>
		<div class="clearfix"></div>
	</div>
	<!--row closed-->
	<?php $this->load->view('admin/manage_event/applicant_particular'); ?>
	<?php $this->load->view('admin/manage_event/applicant_education'); ?>
	<?php $this->load->view('admin/manage_event/applicant_docs'); ?>
</div>
<!--form closed-->
<div class="space30"></div>
<input type="hidden" name="form_type" value="Application" >
<button type="submit" class="btn btn-primary" id="event_application_btn">
	Save & Continue
</button>
<?php echo form_close(); ?>